package cn.manyufun.myf.common.commonutils;

import org.json.JSONException;
import org.json.JSONObject;

import cn.manyufun.myf.app.AppApplication;

import static cn.manyufun.myf.common.commonutils.VersionUtils.getVersionCode;

/**
 * Created by Xiao on 2018-01-31.
 */

public class APIUtils {
    public static JSONObject getHeadParamter() {
        JSONObject head = new JSONObject();
        try {
            head.put("AppVersion", getVersionCode(AppApplication.getAppContext()));
            head.put("DeviceID", "android");
            head.put("OpenId", UserInfoUtils.getInstance().getOpenid());
            head.put("UserToken", UserInfoUtils.getInstance().getToken());
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return head;
    }
}
